home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 1.4 KB | 53 lines | [TEXT/MPS ] |
- // UKeySelectionBehavior.h
- // Copyright © 1985-96 by Apple Computer, Inc. All rights reserved.
-
- #ifndef __UKEYSELECTIONBEHAVIOR__
- #define __UKEYSELECTIONBEHAVIOR__
-
- // MacApp
-
- #ifndef __UBEHAVIOR__
- #include "UBehavior.h"
- #endif
-
-
- //----------------------------------------------------------------------------------------
- // class TKeySelectionBehavior
- //----------------------------------------------------------------------------------------
-
- class TKeySelectionBehavior : public TBehavior
- {
- MA_DECLARE_CLASS;
-
- protected: // fields
- CStr255 fKeySequence;
- long fTimeOutInterval;
- long fLastKeyUpTime;
-
- public: // member functions
-
- TKeySelectionBehavior();
- // Constructor
- virtual ~TKeySelectionBehavior();
- // Destructor
-
- void IKeySelectionBehavior(IDType itsIdentifier);
-
- virtual void DoKeyEvent(TToolboxEvent* event);
- // Accumulate the keystrokes.
-
- virtual void DoKeySelection(const CStr255& keySequence);
- // Called with a the current sequence of characters that have been typed in
- // 'keySequence'. Derived classes can override. Default action is to called
- // 'DoKeySelection' on the fOwner field of this behavior.
-
- virtual void DoKeyUp(TToolboxEvent* event);
- // Set time of keyUp events for timing out and reseting the CString of keys hit.
-
- virtual void SetTimeOutInterval(long timeOutInterval);
- // Change the default time out interval. Default is the value of auto-key
- // threshold.
- };
-
- #endif
-